<?
session_start();
include('conn.php');
$qry1 = "SELECT * from tranentrymast where status=0 order by tranid desc";

$qry = mysql_query($qry1);
$data = array();
$i=1;
while($rows = mysql_fetch_array($qry))
{
	$data[] = array("tranid" => $rows['tranid'],
        			"trandate" => $rows['trandate'],
					"customername" => $rows['customername'],
					"amtreceived"=> $rows['amtreceived'],
					"paymode"=> $rows['paymode'],
					"drawnon"=> $rows['drawnon'],
					"paydate"=> $rows['paydate'],
					"onactoff"=> $rows['onactoff'],
					"contactnumber" => $rows['contactnumber'],
					"fromdate"=> $rows['fromdate'],
				    "todate"=> $rows['todate'],
				    "remarks"=> $rows['remarks'],
                   "enteredby"=> $rows['enteredby'],
                   "entrydt"=> $rows['entrydt'],
                   "status"=> $rows['status']);
}
echo json_encode($data);
?>